import java.util.Comparator;

public class WeightComparator implements Comparator<VideoSegment> {

	@Override
	public int compare(VideoSegment o1, VideoSegment o2) {
		double weight1 = o1.weight;
		double weight2 = o2.weight;
		if (weight1 > weight2)
			return -1;
		else if (weight1 < weight2)
			return 1;
		else
			return 0;
	}

}
